import { isDev, getRequest, postRequest } from '@/api';

const urlsObj = {};
if (isDev) {
  // 取得序列号
  urlsObj.getSerial = postRequest('getSerial');
  /* ********入库相关 inbound********* */
  // 取得入库数据
  urlsObj.getInventoryInboundList = postRequest('inboundOrder/list');
  // 新建入库单
  urlsObj.addInvInbound = postRequest('inboundOrder/add');
  // 提交入库单
  urlsObj.submitInvInbound = getRequest('inboundOrder/submission');
  // 撤回入库单
  urlsObj.backInvInbound = getRequest('inboundOrder/verb');
  // 删除入库单
  urlsObj.deleteInvInbound = getRequest('inboundOrder/del');
  // 查看入库单详情
  urlsObj.detailInvInbound = getRequest('inboundOrder/detail');
  // 根据输入查单号
  urlsObj.queryInboundOrderNo = getRequest('queryInboundOrderNo');
  /* ********出库相关 outbound********* */
  // 取得出库数据
  urlsObj.getInventoryOutboundList = postRequest('outboundOrder/list');
  // 新建出库单
  urlsObj.addInvOutbound = postRequest('outboundOrder/add');
  // 提交出库单
  urlsObj.submitInvOutbound = getRequest('outboundOrder/submission');
  // 撤回出库单
  urlsObj.backInvOutbound = getRequest('outboundOrder/verb');
  // 删除出库单
  urlsObj.deleteInvOutbound = getRequest('outboundOrder/del');
  // 查看出库单详情
  urlsObj.detailInvOutbound = getRequest('outboundOrder/detail');
  /* ********盘点相关 checkout********* */
  // 取得盘点数据
  urlsObj.getCheckoutList = postRequest('checkOutOrder/list');
  // 新建盘点单保存
  urlsObj.saveNewInvCheckout = postRequest('checkOutOrder/save');
  // 新建盘点单提交
  urlsObj.submitNewInvCheckout = postRequest('checkOutOrder/submit');
  // 提交盘点单
  urlsObj.submitInvCheckout = getRequest('checkOutOrder/submit/');
  // 撤回盘点单
  urlsObj.backInvCheckout = getRequest('checkOutOrder/verb');
  // 删除盘点单
  urlsObj.deleteInvCheckout = getRequest('checkOutOrder/del');
  // 查看盘点单详情
  urlsObj.detailInvCheckout = getRequest('checkOutOrder/detail');
  /* ********调拨相关 allot********* */
  // 取得调拨数据
  urlsObj.getAllotList = postRequest('transferOrder/list');
  // 新建调拨单保存
  urlsObj.saveNewInvAllot = postRequest('transferOrder/save');
  // 新建调拨单提交
  urlsObj.submitNewInvAllot = postRequest('transferOrder/submit');
  // 提交调拨单
  urlsObj.submitInvAllot = getRequest('transferOrder/submit/');
  // 撤回调拨单
  urlsObj.backInvAllot = getRequest('transferOrder/verb');
  // 删除调拨单
  urlsObj.deleteInvAllot = getRequest('transferOrder/del');
  // 查看调拨单详情
  urlsObj.detailInvAllot = getRequest('transferOrder/detail');
  /* ********组装拆卸相关 assembly********* */
  // 取得组装拆卸数据
  urlsObj.getAssemblyList = postRequest('assemOrder/list');
  // 新建组装拆卸单保存
  urlsObj.saveNewInvAssembly = postRequest('assemOrder/save');
  // 新建组装拆卸单提交
  urlsObj.submitNewInvAssembly = postRequest('assemOrder/submit');
  // 提交组装拆卸单
  urlsObj.submitInvAssembly = getRequest('assemOrder/submit/');
  // 撤回组装拆卸单
  urlsObj.backInvAssembly = getRequest('assemOrder/verb');
  // 删除组装拆卸单
  urlsObj.deleteInvAssembly = getRequest('assemOrder/del');
  // 查看组装拆卸单详情
  urlsObj.detailInvAssembly = getRequest('assemOrder/detail');
} else {
  // 取得序列号
  urlsObj.getSerial = postRequest('publicInterface/getInventoryDetail');
  // 取得入库数据
  urlsObj.getInventoryInboundList = postRequest('inboundOrder/list');
  // 新建入库单
  urlsObj.addInvInbound = postRequest('inboundOrder/add');
  // 提交入库单
  urlsObj.submitInvInbound = getRequest('inboundOrder/submission/{orderNo}');
  // 撤回入库单
  urlsObj.backInvInbound = getRequest('inboundOrder/verb/{orderNo}');
  // 删除入库单
  urlsObj.deleteInvInbound = getRequest('inboundOrder/del/{orderNo}');
  // 查看入库单详情
  urlsObj.detailInvInbound = getRequest('inboundOrder/detail/{orderNo}');
  // 根据输入查单号
  urlsObj.queryInboundOrderNo = getRequest('queryInboundOrderNo');
  /* ********出库相关 outbound********* */
  // 取得出库数据
  urlsObj.getInventoryOutboundList = postRequest('outboundOrder/list');
  // 新建出库单
  urlsObj.addInvOutbound = postRequest('outboundOrder/add');
  // 提交出库单
  urlsObj.submitInvOutbound = getRequest('outboundOrder/submission/{orderNo}');
  // 撤回出库单
  urlsObj.backInvOutbound = getRequest('outboundOrder/verb/{orderNo}');
  // 删除出库单
  urlsObj.deleteInvOutbound = getRequest('outboundOrder/del/{orderNo}');
  // 查看出库单详情
  urlsObj.detailInvOutbound = getRequest('outboundOrder/detail/{orderNo}');
  /* ********盘点相关 checkout********* */
  // 取得盘点数据
  urlsObj.getCheckoutList = postRequest('checkOutOrder/list');
  // 新建盘点单保存
  urlsObj.saveNewInvCheckout = postRequest('checkOutOrder/save');
  // 新建盘点单提交
  urlsObj.submitNewInvCheckout = postRequest('checkOutOrder/submit');
  // 提交盘点单
  urlsObj.submitInvCheckout = getRequest('checkOutOrder/submit/{orderNo}');
  // 撤回盘点单
  urlsObj.backInvCheckout = getRequest('checkOutOrder/verb/{orderNo}');
  // 删除盘点单
  urlsObj.deleteInvCheckout = getRequest('checkOutOrder/del/{orderNo}');
  // 查看盘点单详情
  urlsObj.detailInvCheckout = getRequest('checkOutOrder/detail/{orderNo}');
  /* ********调拨相关 allot********* */
  // 取得调拨数据
  urlsObj.getAllotList = postRequest('transferOrder/list');
  // 新建调拨单保存
  urlsObj.saveNewInvAllot = postRequest('transferOrder/save');
  // 新建调拨单提交
  urlsObj.submitNewInvAllot = postRequest('transferOrder/submit');
  // 提交调拨单
  urlsObj.submitInvAllot = getRequest('transferOrder/submit/{orderNo}');
  // 撤回调拨单
  urlsObj.backInvAllot = getRequest('transferOrder/verb/{orderNo}');
  // 删除调拨单
  urlsObj.deleteInvAllot = getRequest('transferOrder/del/{orderNo}');
  // 查看调拨单详情
  urlsObj.detailInvAllot = getRequest('transferOrder/detail/{orderNo}');
  /* ********组装拆卸相关 assembly********* */
  // 取得组装拆卸数据
  urlsObj.getAssemblyList = postRequest('assemOrder/list');
  // 新建组装拆卸单保存
  urlsObj.saveNewInvAssembly = postRequest('assemOrder/save');
  // 新建组装拆卸单提交
  urlsObj.submitNewInvAssembly = postRequest('assemOrder/submit');
  // 提交组装拆卸单
  urlsObj.submitInvAssembly = getRequest('assemOrder/submit/{orderNo}');
  // 撤回组装拆卸单
  urlsObj.backInvAssembly = getRequest('assemOrder/verb/{orderNo}');
  // 删除组装拆卸单
  urlsObj.deleteInvAssembly = getRequest('assemOrder/del/{orderNo}');
  // 查看组装拆卸单详情
  urlsObj.detailInvAssembly = getRequest('assemOrder/detail/{orderNo}');
}

export default urlsObj;
